﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SFightAttribute extends IMessageBase
    {
        public var speed:int;
        public var attack:int;
        public var maxLife:int;
        public var maxMana:int;
        public var physDefense:int;
        public var magicDefense:int;
        public var penetration:int;
        public var jouk:int;
        public var hit:int;
        public var crit:int;
        public var toughness:int;
        public var block:int;
        public var expertise:int;
        public var damageReduce:int;
        public var crush:int;
        public var attackSpeed:int;
        public var attackDistance:int;
        public var attackType:int;
        public const _type:int = 3021;
        public static var _regist:SFightAttribute = new SFightAttribute(true);

        public function SFightAttribute(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SFightAttribute();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.speed);
            param1.writeInt(this.attack);
            param1.writeInt(this.maxLife);
            param1.writeInt(this.maxMana);
            param1.writeInt(this.physDefense);
            param1.writeInt(this.magicDefense);
            param1.writeInt(this.penetration);
            param1.writeInt(this.jouk);
            param1.writeInt(this.hit);
            param1.writeInt(this.crit);
            param1.writeInt(this.toughness);
            param1.writeInt(this.block);
            param1.writeInt(this.expertise);
            param1.writeInt(this.damageReduce);
            param1.writeInt(this.crush);
            param1.writeInt(this.attackSpeed);
            param1.writeInt(this.attackDistance);
            param1.writeInt(this.attackType);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.speed = param1.readInt();
            this.attack = param1.readInt();
            this.maxLife = param1.readInt();
            this.maxMana = param1.readInt();
            this.physDefense = param1.readInt();
            this.magicDefense = param1.readInt();
            this.penetration = param1.readInt();
            this.jouk = param1.readInt();
            this.hit = param1.readInt();
            this.crit = param1.readInt();
            this.toughness = param1.readInt();
            this.block = param1.readInt();
            this.expertise = param1.readInt();
            this.damageReduce = param1.readInt();
            this.crush = param1.readInt();
            this.attackSpeed = param1.readInt();
            this.attackDistance = param1.readInt();
            this.attackType = param1.readInt();
            return;
        }// end function

    }
}
